<template>
   <div class="chu-button-container" >
     <button type="button" @click.stop="clickEvent" class="btn btn-primary" :style="{width:width}" v-bind="$attrs"><slot></slot></button>
   </div>
</template>

<script lang='ts'>
import { defineComponent } from 'vue'

export default defineComponent({
  name: 'ChuButton',
  props: {
    width: String
  },
  setup (props, context) {
    const clickEvent = (e: MouseEvent) => {
      context.emit('clickn', e)
    }
    return {
      clickEvent
    }
  }
})
</script>

 <style scoped>
.chu-button-container{
  width: auto;
  margin-bottom: 5px;
}
 </style>
